package com.team.arms.common;

import lombok.Getter;

/**
 * @Author ZZF
 * @Time 2021/07/27 12:07
 */
@Getter
public enum ResultEnum {

    /**
     * 返回结果枚举，每个枚举代表着一个状态
     */
    SUCCESS(200, "操作成功！"),
    ERROR(300, "操作失败！"),
    DATA_NOT_FOUND(301, "查询失败！"),
    PARAMS_NULL(302, "参数不能为空！"),
    NOT_LOGIN(303, "当前账号未登录！"),
    NO_ACCESS(304,"您无权访问!"),
    PARAMS_ERROR(305, "参数不合法！"),
    USER_LOGIN_SUCCESS(306,"用户登录成功"),
    USER_LOGOUT_SUCCESS(307,"用户登出成功"),
    USER_LOGIN_FAILED(308,"用户账号或密码错误"),
    LOGIN_IS_OVERDUE(309,"登录已失效"),
    TOKEN_IS_BLACKLIST(310,"此token为黑名单"),
    REGISTER_SUCCESS(311,"注册成功"),
    ACCOUNT_EXIST(312,"用户名已存在"),
    ACCOUNT_NOT_EXIST(313,"用户名不存在"),
    VERIFY_CODE_ERROR(314,"验证码错误"),
    ACCOUNT_LOCK(315,"账号被锁定"),

    ONLINE_UPDATE(100,"更新成功"),
    NO_UPDATE(101,"不需更新"),
    MUST_UPDATE(102,"需要更新"),
    ERROR_UPDATE(103,"更新失败");



    //状态码
    private Integer code;
    //返回信息
    private String msg;

    ResultEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

}
